package ch.fusun.baron.basic.command;

import ch.fusun.baron.core.command.GameCommand;
import ch.fusun.baron.core.injection.Inject;
import ch.fusun.baron.player.Player;
import ch.fusun.baron.player.api.MarriageService;

/**
 * A command to accept a marriage proposal
 */
public class AcceptMarriageCommand extends GameCommand {

	private transient Player woman;
	private transient Player man;

	@Inject
	MarriageService marriageService;

	/**
	 * Kryo constructor
	 */
	public AcceptMarriageCommand() {
	}

	/**
	 * @param man
	 *            The husband
	 * @param woman
	 *            The bride
	 */
	public AcceptMarriageCommand(Player man, Player woman) {
		this.man = man;
		this.woman = woman;
	}

	@Override
	public boolean isAllowed() {
		throw new RuntimeException("isAllowed not implemented"); //$NON-NLS-1$
	}

	@Override
	public void execute() {
		marriageService.acceptMarriage(man, woman);
	}

}
